package com.yanfan.energy.service;

import com.yanfan.common.core.domain.AjaxResult;
import com.yanfan.energy.domain.EnergyPriceSetting;
import com.yanfan.energy.domain.statist.PriceStatistics;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;
import java.util.Map;

/**
 * 能源单价表(EnergyPriceSetting)表服务接口
 *
 * @author makejava
 * @since 2022-09-28 11:07:38
 */
public interface EnergyPriceSettingService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    EnergyPriceSetting queryById(Integer id);

    /**
     * 分页查询
     *
     * @param energyPriceSetting 筛选条件
     * @param pageRequest        分页对象
     * @return 查询结果
     */
    Page<EnergyPriceSetting> queryByPage(EnergyPriceSetting energyPriceSetting, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param energyPriceSetting 实例对象
     * @return 实例对象
     */
    EnergyPriceSetting insert(EnergyPriceSetting energyPriceSetting);

    /**
     * 修改数据
     *
     * @param energyPriceSetting 实例对象
     * @return 实例对象
     */
    EnergyPriceSetting update(EnergyPriceSetting energyPriceSetting);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    /**
     * 查询能源单价设置
     *
     * @return java.util.List<io.github.jhipster.sample.sansheng.entity.EnergyPriceHistory>
     * @author caijinkang
     * @date 2022/9/28 14:36
     */
    List<EnergyPriceSetting> selectAllEnergyPriceSetting();

    /**
     * 查询能源单价设置job
     *
     * @return java.util.List<io.github.jhipster.sample.sansheng.entity.EnergyPriceHistory>
     * @author caijinkang
     * @date 2022/9/28 14:36
     */
    List<EnergyPriceSetting> selectAllEnergyPriceSettingJob();

    /**
     * 能源单价设置
     *
     * @param priceStatistics
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2022/11/16 11:01
     */
    AjaxResult updateEnergyPriceSetting(List<PriceStatistics> priceStatistics);

    /**
     * 查询单价设置的PC端
     *
     * @return java.util.List<com.ruoyi.common.core.domain.entity.EnergyPriceSetting>
     * @author caijinkang
     * @date 2022/11/9 20:29
     */
    Map<String, List<EnergyPriceSetting>> findPriceElectric();

    /**
     * 查询所有单价设置的24条
     *
     * @return java.util.List<com.ruoyi.common.core.domain.entity.EnergyPriceSetting>
     * @author caijinkang
     * @date 2022/11/10 20:56
     */
    List<EnergyPriceSetting> findAllPriceElectricSet();

    List<EnergyPriceSetting> findAll();

}
